<template>
	<view class="box">
		<Logistics :wlInfo="wlInfo"/>
	</view>
</template>

<script>
	import Logistics from '@/components/logistics/logistics.vue'
	export default {
		components: {
			Logistics
		},
		data() {
			return {
				order_id:'',
				wlInfo: {}
			}
		},
		onLoad(options){
			if(options.order_id){
				this.order_id=options.order_id
				this.searchDeliver()
			}
		},
		methods: {
			searchDeliver(){
				let url = '';
				if (!uni.getStorageSync("key")) {
					return uni.redirectTo({
						url: "/SupplyEnd/login/login",
					});
				}
				url = "/mobile/index.php?act=supplier-order&op=search_deliver";
				let that = this
				this.$util.request({
					url: url,
					method: 'get',
					data: {
						order_id: that.order_id
					}
				}).then(res => {
					if (res.error_code == 0) {
						//更新页面数据
						that.wlInfo=res.datas
					} else {
						uni.showToast({
							title: res.message,
							icon: "none"
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">

</style>